package at.fhooe.mc.master.clc.shared.domain.metrics;

import java.util.Date;

import at.fhooe.mc.master.clc.shared.domain.FrameworkID;

import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;
import com.googlecode.objectify.annotation.Unindex;

@Entity
@Index
public class Metric implements IMetric
{
	@Id private Long id;
	
	private Date timeStamp;
	private FrameworkID frameworkID;
	private MetricKey key;
	@Unindex private MetricTimeValue value;
	
	private Metric() {}
	
	public Metric(Date timeStamp, FrameworkID frameworkID, MetricKey key, MetricTimeValue value)
	{
		this.timeStamp = timeStamp;
		this.frameworkID = frameworkID;
		this.key = key;
		this.value = value;
	}

	@Override
	public Date getTimeStamp()
	{
		return this.timeStamp;
	}

	@Override
	public FrameworkID getFrameworkId()
	{
		return this.frameworkID;
	}

	@Override
	public MetricKey getKey()
	{
		return this.key;
	}

	@Override
	public MetricTimeValue getValue()
	{
		return this.value;
	}

	
}
